﻿CREATE TABLE [dbo].[EventLog] (
    [EventLogId]      INT           IDENTITY (1, 1) NOT NULL,
    [Category]        VARCHAR(MAX) NULL,
    [CategoryString]  VARCHAR (MAX) NULL,
    [ComputerName]    VARCHAR (MAX) NULL,
    [EventCode]       VARCHAR (MAX) NULL,
    [EventIdentifier] VARCHAR (MAX) NULL,
    [EventType]       VARCHAR (MAX) NULL,
    [LogFile]         VARCHAR (MAX) NULL,
    [Message]         VARCHAR (MAX) NULL,
    [RecordNumber]    INT           NULL,
    [SourceName]      VARCHAR (MAX) NULL,
    [TimeGenerated]   DATETIME      NOT NULL,
    [Type]            VARCHAR (MAX) NULL,
    [User]            VARCHAR (MAX) NULL,
    [ServerID]        INT           NULL,
    CONSTRAINT [PK_EventLog] PRIMARY KEY CLUSTERED ([EventLogId] ASC),
    CONSTRAINT [FK_EventLog_Server] FOREIGN KEY ([ServerID]) REFERENCES [dbo].[Server] ([ServerID])
);





